#include <QApplication>
#include "monitor.h"
#include "crashdialog.h"
#include "appearance.h"

int main(int argc, char *argv[])
{   
    setvbuf(stdout,NULL,_IONBF,0);

    QApplication app(argc, argv);
    try{
        HIM::Appearance::LoadStyle(app,":/qss/stylesheets/default_light.qss");
        HIM::Appearance::LoadTranslate(app,":/ts/translations/app_zh.qm");
        Monitor *monitor = new Monitor();
        monitor->init();
        app.exec();
    }catch(std::exception& e){
        QString msg = e.what();
        CrashDialog crashD(msg);
        crashD.exec();
    }
    return 1;
}
